@use './variables.scss';
@use './utils.scss';
@use './components.scss';

// 全局样式重置
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  // 移除点击时的高亮效果
  -webkit-tap-highlight-color: transparent !important;
  outline: none !important;
}

// 移除所有焦点状态的视觉反馈
*:focus {
  outline: none !important;
  box-shadow: none !important;
}

*:active {
  outline: none !important;
}

// 移除文本选中状态
* {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

html,
body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  color: var(--text-color-primary);
  background-color: var(--background-color);
}

// 滚动条样式
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

// Element Plus 样式覆盖
.el-loading-mask {
  background-color: rgba(255, 255, 255, 0.9) !important;
}

// 移除Element Plus组件的焦点和选中效果
.el-menu-item,
.el-sub-menu__title,
.el-button,
.el-dropdown-link {
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
  user-select: none !important;
}

.el-menu-item:focus,
.el-sub-menu__title:focus,
.el-button:focus,
.el-dropdown-link:focus {
  outline: none !important;
  box-shadow: none !important;
}

.el-menu-item:active,
.el-sub-menu__title:active,
.el-button:active,
.el-dropdown-link:active {
  outline: none !important;
  box-shadow: none !important;
}

// 特别针对菜单文本的选中效果
.el-menu-item span,
.el-sub-menu__title span {
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
}
